package com.dingreading.cloud.web.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 实体类。
 *
 * @author Administrator
 * @since 2023-11-22
 */
@Data
@Table(value = "cooper_pay_order")
public class CooperPayOrder implements Serializable {

    @Id(keyType = KeyType.Auto)
    private Long id;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()")
    private Date addTime;

    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(onInsertValue = "now()", onUpdateValue = "now()")
    private Date editTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date expireTime;

    /**
     * 订单号
     */
    @ApiModelProperty(value = "订单号")
    private String code;

    /**
     * 收支项目id
     */
    @ApiModelProperty(value = "项目id")
    private Integer projectType;

    /**
     * 收支项目名
     */
    @ApiModelProperty(value = "项目名")
    private String projectName;

    @ApiModelProperty(value = "公司主体名称")
    private String corpName;

    @ApiModelProperty(value = "客户姓名")
    private String userName;

    @ApiModelProperty(value = "客户电话")
    private String userPhone;

    @ApiModelProperty(value = "销售姓名")
    private String saleName;

    @ApiModelProperty(value = "收款项目名称")
    private String payName;

    @ApiModelProperty(value = "订单uid")
    private String orderUid;

    /**
     * 数量
     */
    @ApiModelProperty(value = "数量")
    private Integer buyNum;

    /**
     * 支付价格
     */
    @ApiModelProperty(value = "支付价格")
    private Double payPrice;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 状态
     * 状态 0.取消 1.已支付 2.待付款
     */
    @ApiModelProperty(value = "状态 0.取消 1.已支付 2.待付款")
    private Integer status;

    /**
     * 支付通道
     */
    @ApiModelProperty(value = "支付通道")
    private String payChannelCode;

    /**
     * 支付时间
     */
    @ApiModelProperty(value = "支付时间")
    private String payTime;

    /**
     * 支付用户id
     */
    @ApiModelProperty(value = "支付用户id")
    private String buyerId;

    /**
     * 支付订单号
     */
    @ApiModelProperty(value = "支付订单号")
    private String tradeNo;

    /**
     * 支付类型 1微信,2支付宝
     */
    @ApiModelProperty(value = "支付类型 1微信,2支付宝")
    private Integer payType;

    /**
     * 交易方式 扫码支付：NATIVE,app支付：APP,公众号支付：JSAPI,H5支付：WAP，堡币支付：BAOBI
     */
    @ApiModelProperty(value = "交易方式")
    private String tradeType;

}
